package study.domain.user;

import java.io.Serializable;

import javax.persistence.EmbeddedId;
import javax.persistence.Entity;

import lombok.Data;

/**
 * 역활 계층
 *
 * @author Barney Kim
 */
@Entity(name = "roles_hierarchy")
@Data
public class RoleHierarchy implements Serializable {

	private static final long serialVersionUID = 2190707222482606505L;

	@EmbeddedId
	private RoleHierarchyId id;

	public RoleHierarchy() {
		//
	}

	public RoleHierarchy(Role parentRole, Role childRole) {
		this(new RoleHierarchyId(parentRole, childRole));
	}

	public RoleHierarchy(RoleHierarchyId id) {
		this.id = id;
	}
}
